<?php

class Util_Mail {

	static public function send($to,$subject,$body){
		// CYRUS
		/**
		$cfg = array(
			'auth' => 'Login', //false, Plain, Login, Crammd5
			'username'=>'lk','password'=>'***','port'=>25
		);
		$tr = new Zend_Mail_Transport_Smtp('cyrus.int.webtel.pl',$cfg);
		*/
		//$fc  = \Zend\Controller\Front::getInstance();
		
		$tr = new Zend_Mail_Transport_Smtp('zimbra.int.ccp.pl');
		//Zend_Mail::setDefaultTransport($tr);
		
		if(is_array($to)){
			list($to,$as) = $to;
		} else $as = '';
		
		$mail = new Zend_Mail('utf8');
		$mail->setFrom('timesheet@webtel.pl', 'System TS')
			->addTo($to, $as)
			->setSubject($subject)
			->setBodyHtml($body)
			->send($tr);
	}
	
}